package kr.hkit.androidcomplete01.ch17;

import kr.hkit.androidcomplete01.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class CallAdd extends Activity { //부모!
	
	public static final String MAINTAG = "Activity Life Cycle";
	public static final String SUBTAG = "Parent";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		Log.i(MAINTAG, SUBTAG + "- onCreate");
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch17_calladd);
	}

	public void mOnClick(View v){
		Intent intent = new Intent("kr.hkit.androidcomplete01.ch17.ADD");
		intent.putExtra("left", 3);
		intent.putExtra("right", 4);
		startActivity(intent);
	}

	@Override //복원될때 자동 호출됨
	protected void onRestoreInstanceState(Bundle savedInstanceState) {
		Log.i(MAINTAG, SUBTAG + "- onRestoreInstanceState");
		super.onRestoreInstanceState(savedInstanceState);
	}

	@Override
	protected void onStart() {
		Log.i(MAINTAG, SUBTAG + "- onStart");
		super.onStart();
	}

	@Override
	protected void onRestart() {
		Log.i(MAINTAG, SUBTAG + "- onRestart");
		super.onRestart();
	}

	@Override
	protected void onResume() {
		Log.i(MAINTAG, SUBTAG + "- onResume");
		super.onResume();
	}

	@Override
	protected void onSaveInstanceState(Bundle outState) {
		Log.i(MAINTAG, SUBTAG + "- onSaveInstanceState");
		super.onSaveInstanceState(outState);
	}

	@Override
	protected void onPause() {
		Log.i(MAINTAG, SUBTAG + "- onPause");
		super.onPause();
	}

	@Override
	protected void onStop() {
		Log.i(MAINTAG, SUBTAG + "- onStop");
		super.onStop();
	}

	@Override
	protected void onDestroy() {
		Log.i(MAINTAG, SUBTAG + "- onDestroy");
		super.onDestroy();
	}
	
}
